{% extends "bootstrap/base.html" %}
{% block title %} Flasky {% endblock %}
{% block head %}
    {{ super() }}
    <style>

    </style>
{% endblock %}
{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle"
                    data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Flasky</a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navvbar-nav">
                <li><a href="/">Home</a></li>
            </ul>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
    <div class="container">
        {% block page_content %}
        <div class="page-header">
            <h1>{{ user.username }}</h1>
            {% if user.name or user.location %}
            <p>
                {% if user.name %}{{ user.name }} {% endif %}
                {% if user.location %}
                    Form <a href="http://www.baidu.com/?q={{user.location}}">
                        {{ user.location}}
                    </a>
                {% endif%}
            </p>
            {% endif %}
            {% if current_user.is_administrator() %}
            <p><a href="mailto:{{user.email}}"></a></p>
            {% endif %}
            {% if user.about_me %}<p> {{ user.about_me }}</p> {% endif %}
            <p>
                Member since {{ moment(user.member_since).format('L')}} .
                Last seen {{ moment(user.last_seen).fromNow() }}.
            </p>
            <p>
                {% if user == current_user %}
                <a class="btn btn-default" href="{{ url_for('.edit_profile') }}">Edit Profile</a>
                {% endif %}
                {% if current_user.is_administrator() %}
                <a class="btn btn-danger" href="{{ url_for('.edit_profile_admin', id=user.id) }}">Edit Profile [Admin]</a>
                {% endif %}
            </p>

        </div>
        {% endblock %}
    </div>
{% endblock %}

